<?php

namespace Morrow;

class PageController extends DefaultController {
	public function run() {




		$code = $this->input->get('id');

		if(!$code){
			$this -> url -> redirect('home');
		}
		//var_dump($uid);
		$this->load('Db', $this->config->get('db'));	
		$sql=$this->db->result('
			SELECT *
			FROM webapps
			WHERE code = ?'
			, $code);
		//var_dump($sql["RESULT"]);

		$this->view->setContent($sql, 'data');
	}	
}